<template>
    <div class="profile-liked">
        <Navigator>
            <template v-slot:center>
                <div class="title">点赞过的微博</div>
            </template>
        </Navigator>
        <div class="body">
            <div class="list">
                <div
                    class="item"
                    v-for="(item, index) in likedWeibo"
                    :key="index"
                >
                    <PostItem :scene="'liked'" :item="item.detail" />
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import PostItem from "@/pages/community/components/postItem/index";
export default {
    components: {
        PostItem
    },
    data() {
        return {
            likedWeibo: []
        };
    },
    created() {
        this.getLikedWeibo();
    },
    methods: {
        getLikedWeibo() {
            this.$cloudApi.getUserLiked().then(res => {
                console.log("点赞过的微博", res);
                this.likedWeibo = res;
            });
        }
    }
};
</script>


<style lang="less" scoped>
.profile-liked {
    padding-top: 120px;
    box-sizing: border-box;
    min-height: 100vh;
    background: #f5f5f5;
    .body {
        width: 100%;
    }
}
</style>